package com.uobgroup.ews.uam.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.core.convert.converter.Converter;
import org.springframework.format.FormatterRegistry;
import org.springframework.format.support.FormattingConversionServiceFactoryBean;

import com.uobgroup.ews.uam.core.domain.AccessControl;
import com.uobgroup.ews.uam.core.domain.AccessToStaff;
import com.uobgroup.ews.uam.core.domain.ApplicationConfiguration;
import com.uobgroup.ews.uam.core.domain.CombinationMatrix;
import com.uobgroup.ews.uam.core.domain.CountryLocation;
import com.uobgroup.ews.uam.core.domain.CountryProcessingCentre;
import com.uobgroup.ews.uam.core.domain.LocationTransaction;
import com.uobgroup.ews.uam.core.domain.ProcessingCentreTransaction;
import com.uobgroup.ews.uam.core.domain.Profile;
import com.uobgroup.ews.uam.core.domain.Reference;
import com.uobgroup.ews.uam.core.domain.ReferenceType;
import com.uobgroup.ews.uam.core.domain.RoleSubType;
import com.uobgroup.ews.uam.core.domain.SecurityGroup;
import com.uobgroup.ews.uam.core.domain.Segment;
import com.uobgroup.ews.uam.core.domain.TransactionDocument;
import com.uobgroup.ews.uam.core.domain.UAMRole;
import com.uobgroup.ews.uam.core.domain.UAMUser;
import com.uobgroup.ews.uam.core.service.AccessControlService;
import com.uobgroup.ews.uam.core.service.AccessToStaffService;
import com.uobgroup.ews.uam.core.service.ApplicationConfigurationService;
import com.uobgroup.ews.uam.core.service.ReferenceService;
import com.uobgroup.ews.uam.core.service.ReferenceTypeService;
import com.uobgroup.ews.uam.core.service.RoleSubTypeService;
import com.uobgroup.ews.uam.core.service.SecurityGroupService;
import com.uobgroup.ews.uam.core.service.UAMUserService;

@Configurable
/**
 * A central place to register application converters and formatters. 
 */
public class ApplicationConversionServiceFactoryBean extends FormattingConversionServiceFactoryBean {

	@Override
	protected void installFormatters(FormatterRegistry registry) {
		super.installFormatters(registry);
		// Register application converters and formatters
	}

	@Autowired
    AccessControlService accessControlService;

	@Autowired
    AccessToStaffService accessToStaffService;

	@Autowired
    ApplicationConfigurationService applicationConfigurationService;

	@Autowired
    ReferenceService referenceService;
	
	@Autowired
   ReferenceTypeService referenceTypeService;

	@Autowired
    SecurityGroupService securityGroupService;

	@Autowired
    UAMUserService uAMUserService;
	
	@Autowired
	RoleSubTypeService roleSubTypeService;
	
	public Converter<AccessControl, String> getAccessControlToStringConverter() {
        return new org.springframework.core.convert.converter.Converter<com.uobgroup.ews.uam.core.domain.AccessControl, java.lang.String>() {
            public String convert(AccessControl accessControl) {
               return new StringBuilder().append(accessControl.getName()).append(' ').append(accessControl.getPermission()).append(' ').append(accessControl.getDescription()).toString();
            }
        };
    }

	public Converter<Long, AccessControl> getIdToAccessControlConverter() {
        return new org.springframework.core.convert.converter.Converter<java.lang.Long, com.uobgroup.ews.uam.core.domain.AccessControl>() {
            public com.uobgroup.ews.uam.core.domain.AccessControl convert(java.lang.Long id) {
                return accessControlService.findAccessControl(id);
            }
        };
    }

	public Converter<String, AccessControl> getStringToAccessControlConverter() {
        return new org.springframework.core.convert.converter.Converter<java.lang.String, com.uobgroup.ews.uam.core.domain.AccessControl>() {
            public com.uobgroup.ews.uam.core.domain.AccessControl convert(String id) {
                return getObject().convert(getObject().convert(id, Long.class), AccessControl.class);
            }
        };
    }

	public Converter<AccessToStaff, String> getAccessToStaffToStringConverter() {
        return new org.springframework.core.convert.converter.Converter<com.uobgroup.ews.uam.core.domain.AccessToStaff, java.lang.String>() {
            public String convert(AccessToStaff accessToStaff) {
                return new StringBuilder().append(accessToStaff.getName()).append(' ').append(accessToStaff.getDescription()).toString();
            }
        };
    }

	public Converter<Long, AccessToStaff> getIdToAccessToStaffConverter() {
        return new org.springframework.core.convert.converter.Converter<java.lang.Long, com.uobgroup.ews.uam.core.domain.AccessToStaff>() {
            public com.uobgroup.ews.uam.core.domain.AccessToStaff convert(java.lang.Long id) {
                return accessToStaffService.findAccessToStaff(id);
            }
        };
    }

	public Converter<String, AccessToStaff> getStringToAccessToStaffConverter() {
        return new org.springframework.core.convert.converter.Converter<java.lang.String, com.uobgroup.ews.uam.core.domain.AccessToStaff>() {
            public com.uobgroup.ews.uam.core.domain.AccessToStaff convert(String id) {
                return getObject().convert(getObject().convert(id, Long.class), AccessToStaff.class);
            }
        };
    }

	public Converter<ApplicationConfiguration, String> getApplicationConfigurationToStringConverter() {
        return new org.springframework.core.convert.converter.Converter<com.uobgroup.ews.uam.core.domain.ApplicationConfiguration, java.lang.String>() {
            public String convert(ApplicationConfiguration applicationConfiguration) {
                return new StringBuilder().append(applicationConfiguration.getName()).append(' ').append(applicationConfiguration.getPropertyKey()).append(' ').append(applicationConfiguration.getPropertyValue()).append(' ').append(applicationConfiguration.getDescription()).toString();
            }
        };
    }

	public Converter<Long, ApplicationConfiguration> getIdToApplicationConfigurationConverter() {
        return new org.springframework.core.convert.converter.Converter<java.lang.Long, com.uobgroup.ews.uam.core.domain.ApplicationConfiguration>() {
            public com.uobgroup.ews.uam.core.domain.ApplicationConfiguration convert(java.lang.Long id) {
                return applicationConfigurationService.findApplicationConfiguration(id);
            }
        };
    }

	public Converter<String, ApplicationConfiguration> getStringToApplicationConfigurationConverter() {
        return new org.springframework.core.convert.converter.Converter<java.lang.String, com.uobgroup.ews.uam.core.domain.ApplicationConfiguration>() {
            public com.uobgroup.ews.uam.core.domain.ApplicationConfiguration convert(String id) {
                return getObject().convert(getObject().convert(id, Long.class), ApplicationConfiguration.class);
            }
        };
    }

	public Converter<CombinationMatrix, String> getCombinationMatrixToStringConverter() {
        return new org.springframework.core.convert.converter.Converter<com.uobgroup.ews.uam.core.domain.CombinationMatrix, java.lang.String>() {
            public String convert(CombinationMatrix combinationMatrix) {
               return new StringBuilder().append(combinationMatrix.getDescription()).toString();
            }
        };
    }

	public Converter<Long, CombinationMatrix> getIdToCombinationMatrixConverter() {
        return new org.springframework.core.convert.converter.Converter<java.lang.Long, com.uobgroup.ews.uam.core.domain.CombinationMatrix>() {
            public com.uobgroup.ews.uam.core.domain.CombinationMatrix convert(java.lang.Long id) {
                //return CombinationMatrix.findCombinationMatrix(id);
               return null;
            }
        };
    }

	public Converter<String, CombinationMatrix> getStringToCombinationMatrixConverter() {
        return new org.springframework.core.convert.converter.Converter<java.lang.String, com.uobgroup.ews.uam.core.domain.CombinationMatrix>() {
            public com.uobgroup.ews.uam.core.domain.CombinationMatrix convert(String id) {
                return getObject().convert(getObject().convert(id, Long.class), CombinationMatrix.class);
            }
        };
    }

	public Converter<CountryLocation, String> getCountryLocationToStringConverter() {
        return new org.springframework.core.convert.converter.Converter<com.uobgroup.ews.uam.core.domain.CountryLocation, java.lang.String>() {
            public String convert(CountryLocation countryLocation) {
                return "(no displayable fields)";
            }
        };
    }

	public Converter<Long, CountryLocation> getIdToCountryLocationConverter() {
        return new org.springframework.core.convert.converter.Converter<java.lang.Long, com.uobgroup.ews.uam.core.domain.CountryLocation>() {
            public com.uobgroup.ews.uam.core.domain.CountryLocation convert(java.lang.Long id) {
                //return CountryLocation.findCountryLocation(id);
               return null;
            }
        };
    }

	public Converter<String, CountryLocation> getStringToCountryLocationConverter() {
        return new org.springframework.core.convert.converter.Converter<java.lang.String, com.uobgroup.ews.uam.core.domain.CountryLocation>() {
            public com.uobgroup.ews.uam.core.domain.CountryLocation convert(String id) {
                return getObject().convert(getObject().convert(id, Long.class), CountryLocation.class);
            }
        };
    }

	public Converter<CountryProcessingCentre, String> getCountryProcessingCentreToStringConverter() {
        return new org.springframework.core.convert.converter.Converter<com.uobgroup.ews.uam.core.domain.CountryProcessingCentre, java.lang.String>() {
            public String convert(CountryProcessingCentre countryProcessingCentre) {
                return "(no displayable fields)";
            }
        };
    }

	public Converter<Long, CountryProcessingCentre> getIdToCountryProcessingCentreConverter() {
        return new org.springframework.core.convert.converter.Converter<java.lang.Long, com.uobgroup.ews.uam.core.domain.CountryProcessingCentre>() {
            public com.uobgroup.ews.uam.core.domain.CountryProcessingCentre convert(java.lang.Long id) {
                //return CountryProcessingCentre.findCountryProcessingCentre(id);
               return null;
            }
        };
    }

	public Converter<String, CountryProcessingCentre> getStringToCountryProcessingCentreConverter() {
        return new org.springframework.core.convert.converter.Converter<java.lang.String, com.uobgroup.ews.uam.core.domain.CountryProcessingCentre>() {
            public com.uobgroup.ews.uam.core.domain.CountryProcessingCentre convert(String id) {
                return getObject().convert(getObject().convert(id, Long.class), CountryProcessingCentre.class);
            }
        };
    }

	public Converter<LocationTransaction, String> getLocationTransactionToStringConverter() {
        return new org.springframework.core.convert.converter.Converter<com.uobgroup.ews.uam.core.domain.LocationTransaction, java.lang.String>() {
            public String convert(LocationTransaction locationTransaction) {
                return "(no displayable fields)";
            }
        };
    }

	public Converter<Long, LocationTransaction> getIdToLocationTransactionConverter() {
        return new org.springframework.core.convert.converter.Converter<java.lang.Long, com.uobgroup.ews.uam.core.domain.LocationTransaction>() {
            public com.uobgroup.ews.uam.core.domain.LocationTransaction convert(java.lang.Long id) {
                //return LocationTransaction.findLocationTransaction(id);
               return null;
            }
        };
    }

	public Converter<String, LocationTransaction> getStringToLocationTransactionConverter() {
        return new org.springframework.core.convert.converter.Converter<java.lang.String, com.uobgroup.ews.uam.core.domain.LocationTransaction>() {
            public com.uobgroup.ews.uam.core.domain.LocationTransaction convert(String id) {
                return getObject().convert(getObject().convert(id, Long.class), LocationTransaction.class);
            }
        };
    }

	public Converter<ProcessingCentreTransaction, String> getProcessingCentreTransactionToStringConverter() {
        return new org.springframework.core.convert.converter.Converter<com.uobgroup.ews.uam.core.domain.ProcessingCentreTransaction, java.lang.String>() {
            public String convert(ProcessingCentreTransaction processingCentreTransaction) {
                return "(no displayable fields)";
            }
        };
    }

	public Converter<Long, ProcessingCentreTransaction> getIdToProcessingCentreTransactionConverter() {
        return new org.springframework.core.convert.converter.Converter<java.lang.Long, com.uobgroup.ews.uam.core.domain.ProcessingCentreTransaction>() {
            public com.uobgroup.ews.uam.core.domain.ProcessingCentreTransaction convert(java.lang.Long id) {
                //return ProcessingCentreTransaction.findProcessingCentreTransaction(id);
               return null;
            }
        };
    }

	public Converter<String, ProcessingCentreTransaction> getStringToProcessingCentreTransactionConverter() {
        return new org.springframework.core.convert.converter.Converter<java.lang.String, com.uobgroup.ews.uam.core.domain.ProcessingCentreTransaction>() {
            public com.uobgroup.ews.uam.core.domain.ProcessingCentreTransaction convert(String id) {
                return getObject().convert(getObject().convert(id, Long.class), ProcessingCentreTransaction.class);
            }
        };
    }

	public Converter<Profile, String> getProfileToStringConverter() {
        return new org.springframework.core.convert.converter.Converter<com.uobgroup.ews.uam.core.domain.Profile, java.lang.String>() {
            public String convert(Profile profile) {
                return new StringBuilder().append(profile.getName()).append(' ').append(profile.getDescription()).append(' ').toString();
            }
        };
    }

	public Converter<Long, Profile> getIdToProfileConverter() {
        return new org.springframework.core.convert.converter.Converter<java.lang.Long, com.uobgroup.ews.uam.core.domain.Profile>() {
            public com.uobgroup.ews.uam.core.domain.Profile convert(java.lang.Long id) {
                //return Profile.findProfile(id);
               return null;
            }
        };
    }

	public Converter<String, Profile> getStringToProfileConverter() {
        return new org.springframework.core.convert.converter.Converter<java.lang.String, com.uobgroup.ews.uam.core.domain.Profile>() {
            public com.uobgroup.ews.uam.core.domain.Profile convert(String id) {
                return getObject().convert(getObject().convert(id, Long.class), Profile.class);
            }
        };
    }

	public Converter<Reference, String> getReferenceToStringConverter() {
        return new org.springframework.core.convert.converter.Converter<com.uobgroup.ews.uam.core.domain.Reference, java.lang.String>() {
            public String convert(Reference reference) {
                return new StringBuilder().append(reference.getName()).append(' ').append(reference.getCode()).toString();
            }
        };
    }

	public Converter<Long, Reference> getIdToReferenceConverter() {
        return new org.springframework.core.convert.converter.Converter<java.lang.Long, com.uobgroup.ews.uam.core.domain.Reference>() {
            public com.uobgroup.ews.uam.core.domain.Reference convert(java.lang.Long id) {
                return referenceService.findReference(id);
            }
        };
    }

	public Converter<String, Reference> getStringToReferenceConverter() {
        return new org.springframework.core.convert.converter.Converter<java.lang.String, com.uobgroup.ews.uam.core.domain.Reference>() {
            public com.uobgroup.ews.uam.core.domain.Reference convert(String id) {
                return getObject().convert(getObject().convert(id, Long.class), Reference.class);
            }
        };
    }
	
	public Converter<ReferenceType, String> getReferenceTypeToStringConverter() {
      return new org.springframework.core.convert.converter.Converter<com.uobgroup.ews.uam.core.domain.ReferenceType, java.lang.String>() {
          public String convert(ReferenceType referenceType) {
              return new StringBuilder().append(referenceType.getName()).append(' ').append(referenceType.getCode()).toString();
          }
      };
	}
   
   public Converter<Long, ReferenceType> getIdToReferenceTypeConverter() {
      return new org.springframework.core.convert.converter.Converter<java.lang.Long, com.uobgroup.ews.uam.core.domain.ReferenceType>() {
         public com.uobgroup.ews.uam.core.domain.ReferenceType convert(java.lang.Long id) {
            return referenceTypeService.findReferenceType(id);
            }
      };
   }
   
   public Converter<String, ReferenceType> getStringToReferenceTypeConverter() {
      return new org.springframework.core.convert.converter.Converter<java.lang.String, com.uobgroup.ews.uam.core.domain.ReferenceType>() {
         public com.uobgroup.ews.uam.core.domain.ReferenceType convert(String id) {
            return getObject().convert(getObject().convert(id, Long.class), ReferenceType.class);
            }
      };
   }

	public Converter<SecurityGroup, String> getSecurityGroupToStringConverter() {
        return new org.springframework.core.convert.converter.Converter<com.uobgroup.ews.uam.core.domain.SecurityGroup, java.lang.String>() {
            public String convert(SecurityGroup securityGroup) {
                return new StringBuilder().append(securityGroup.getDescription()).append(' ').append(securityGroup.getDisplayName()).append(' ').append(securityGroup.getDN()).toString();
            }
        };
    }

	public Converter<Long, SecurityGroup> getIdToSecurityGroupConverter() {
        return new org.springframework.core.convert.converter.Converter<java.lang.Long, com.uobgroup.ews.uam.core.domain.SecurityGroup>() {
            public com.uobgroup.ews.uam.core.domain.SecurityGroup convert(java.lang.Long id) {
                return securityGroupService.findSecurityGroup(id);
            }
        };
    }

	public Converter<String, SecurityGroup> getStringToSecurityGroupConverter() {
        return new org.springframework.core.convert.converter.Converter<java.lang.String, com.uobgroup.ews.uam.core.domain.SecurityGroup>() {
            public com.uobgroup.ews.uam.core.domain.SecurityGroup convert(String id) {
                return getObject().convert(getObject().convert(id, Long.class), SecurityGroup.class);
            }
        };
    }

	public Converter<Segment, String> getSegmentToStringConverter() {
        return new org.springframework.core.convert.converter.Converter<com.uobgroup.ews.uam.core.domain.Segment, java.lang.String>() {
            public String convert(Segment segment) {
                return "(no displayable fields)";
            }
        };
    }

	public Converter<Long, Segment> getIdToSegmentConverter() {
        return new org.springframework.core.convert.converter.Converter<java.lang.Long, com.uobgroup.ews.uam.core.domain.Segment>() {
            public com.uobgroup.ews.uam.core.domain.Segment convert(java.lang.Long id) {
                //return Segment.findSegment(id);
               return null;
            }
        };
    }

	public Converter<String, Segment> getStringToSegmentConverter() {
        return new org.springframework.core.convert.converter.Converter<java.lang.String, com.uobgroup.ews.uam.core.domain.Segment>() {
            public com.uobgroup.ews.uam.core.domain.Segment convert(String id) {
                return getObject().convert(getObject().convert(id, Long.class), Segment.class);
            }
        };
    }

	public Converter<TransactionDocument, String> getTransactionDocumentToStringConverter() {
        return new org.springframework.core.convert.converter.Converter<com.uobgroup.ews.uam.core.domain.TransactionDocument, java.lang.String>() {
            public String convert(TransactionDocument transactionDocument) {
                return "(no displayable fields)";
            }
        };
    }

	public Converter<Long, TransactionDocument> getIdToTransactionDocumentConverter() {
        return new org.springframework.core.convert.converter.Converter<java.lang.Long, com.uobgroup.ews.uam.core.domain.TransactionDocument>() {
            public com.uobgroup.ews.uam.core.domain.TransactionDocument convert(java.lang.Long id) {
                //return TransactionDocument.findTransactionDocument(id);
               return null;
            }
        };
    }

	public Converter<String, TransactionDocument> getStringToTransactionDocumentConverter() {
        return new org.springframework.core.convert.converter.Converter<java.lang.String, com.uobgroup.ews.uam.core.domain.TransactionDocument>() {
            public com.uobgroup.ews.uam.core.domain.TransactionDocument convert(String id) {
                return getObject().convert(getObject().convert(id, Long.class), TransactionDocument.class);
            }
        };
    }

	public Converter<UAMRole, String> getUAMRoleToStringConverter() {
        return new org.springframework.core.convert.converter.Converter<com.uobgroup.ews.uam.core.domain.UAMRole, java.lang.String>() {
            public String convert(UAMRole uAMRole) {
                return new StringBuilder().append(uAMRole.getName()).append(' ').append(uAMRole.getDescription()).toString();
            }
        };
    }

	public Converter<Long, UAMRole> getIdToUAMRoleConverter() {
        return new org.springframework.core.convert.converter.Converter<java.lang.Long, com.uobgroup.ews.uam.core.domain.UAMRole>() {
            public com.uobgroup.ews.uam.core.domain.UAMRole convert(java.lang.Long id) {
                //return UAMRole.findUAMRole(id);
               return null;
            }
        };
    }

	public Converter<String, UAMRole> getStringToUAMRoleConverter() {
        return new org.springframework.core.convert.converter.Converter<java.lang.String, com.uobgroup.ews.uam.core.domain.UAMRole>() {
            public com.uobgroup.ews.uam.core.domain.UAMRole convert(String id) {
                return getObject().convert(getObject().convert(id, Long.class), UAMRole.class);
            }
        };
    }

	public Converter<UAMUser, String> getUAMUserToStringConverter() {
        return new org.springframework.core.convert.converter.Converter<com.uobgroup.ews.uam.core.domain.UAMUser, java.lang.String>() {
            public String convert(UAMUser uAMUser) {
                return new StringBuilder().append(uAMUser.getUsername()).append(' ').append(uAMUser.getProxyUser()).toString();
            }
        };
    }

	public Converter<Long, UAMUser> getIdToUAMUserConverter() {
        return new org.springframework.core.convert.converter.Converter<java.lang.Long, com.uobgroup.ews.uam.core.domain.UAMUser>() {
            public com.uobgroup.ews.uam.core.domain.UAMUser convert(java.lang.Long id) {
                return uAMUserService.findUAMUser(id);
            }
        };
    }

	public Converter<String, UAMUser> getStringToUAMUserConverter() {
        return new org.springframework.core.convert.converter.Converter<java.lang.String, com.uobgroup.ews.uam.core.domain.UAMUser>() {
            public com.uobgroup.ews.uam.core.domain.UAMUser convert(String id) {
                return getObject().convert(getObject().convert(id, Long.class), UAMUser.class);
            }
        };
    }

	public Converter<RoleSubType, String> getRoleSubTypeToStringConverter() {
        return new org.springframework.core.convert.converter.Converter<com.uobgroup.ews.uam.core.domain.RoleSubType, java.lang.String>() {
            public String convert(RoleSubType roleSubType) {
                return new StringBuilder().append(roleSubType.getName()).append(' ').append(roleSubType.getRoleType()).toString();
            }
        };
    }

	public Converter<Long, RoleSubType> getIdToRoleSubTypeConverter() {
        return new org.springframework.core.convert.converter.Converter<java.lang.Long, com.uobgroup.ews.uam.core.domain.RoleSubType>() {
            public com.uobgroup.ews.uam.core.domain.RoleSubType convert(java.lang.Long id) {
                return roleSubTypeService.findRoleSubType(id);
            }
        };
    }

	public Converter<String, RoleSubType> getStringToRoleSubTypeConverter() {
        return new org.springframework.core.convert.converter.Converter<java.lang.String, com.uobgroup.ews.uam.core.domain.RoleSubType>() {
            public com.uobgroup.ews.uam.core.domain.RoleSubType convert(String id) {
                return getObject().convert(getObject().convert(id, Long.class), RoleSubType.class);
            }
        };
    }
	
	public void installLabelConverters(FormatterRegistry registry) {
        registry.addConverter(getAccessControlToStringConverter());
        registry.addConverter(getIdToAccessControlConverter());
        registry.addConverter(getStringToAccessControlConverter());
        registry.addConverter(getAccessToStaffToStringConverter());
        registry.addConverter(getIdToAccessToStaffConverter());
        registry.addConverter(getStringToAccessToStaffConverter());
        registry.addConverter(getApplicationConfigurationToStringConverter());
        registry.addConverter(getIdToApplicationConfigurationConverter());
        registry.addConverter(getStringToApplicationConfigurationConverter());
        registry.addConverter(getCombinationMatrixToStringConverter());
        registry.addConverter(getIdToCombinationMatrixConverter());
        registry.addConverter(getStringToCombinationMatrixConverter());
        registry.addConverter(getCountryLocationToStringConverter());
        registry.addConverter(getIdToCountryLocationConverter());
        registry.addConverter(getStringToCountryLocationConverter());
        registry.addConverter(getCountryProcessingCentreToStringConverter());
        registry.addConverter(getIdToCountryProcessingCentreConverter());
        registry.addConverter(getStringToCountryProcessingCentreConverter());
        registry.addConverter(getLocationTransactionToStringConverter());
        registry.addConverter(getIdToLocationTransactionConverter());
        registry.addConverter(getStringToLocationTransactionConverter());
        registry.addConverter(getProcessingCentreTransactionToStringConverter());
        registry.addConverter(getIdToProcessingCentreTransactionConverter());
        registry.addConverter(getStringToProcessingCentreTransactionConverter());
        registry.addConverter(getProfileToStringConverter());
        registry.addConverter(getIdToProfileConverter());
        registry.addConverter(getStringToProfileConverter());
        registry.addConverter(getReferenceToStringConverter());
        registry.addConverter(getIdToReferenceConverter());
        registry.addConverter(getStringToReferenceConverter());
        registry.addConverter(getSecurityGroupToStringConverter());
        registry.addConverter(getIdToSecurityGroupConverter());
        registry.addConverter(getStringToSecurityGroupConverter());
        registry.addConverter(getSegmentToStringConverter());
        registry.addConverter(getIdToSegmentConverter());
        registry.addConverter(getStringToSegmentConverter());
        registry.addConverter(getTransactionDocumentToStringConverter());
        registry.addConverter(getIdToTransactionDocumentConverter());
        registry.addConverter(getStringToTransactionDocumentConverter());
        registry.addConverter(getUAMRoleToStringConverter());
        registry.addConverter(getIdToUAMRoleConverter());
        registry.addConverter(getStringToUAMRoleConverter());
        registry.addConverter(getUAMUserToStringConverter());
        registry.addConverter(getIdToUAMUserConverter());
        registry.addConverter(getStringToUAMUserConverter());
        registry.addConverter(getRoleSubTypeToStringConverter());
        registry.addConverter(getIdToRoleSubTypeConverter());
        registry.addConverter(getStringToRoleSubTypeConverter());
        registry.addConverter(getReferenceTypeToStringConverter());
        registry.addConverter(getIdToReferenceTypeConverter());
        registry.addConverter(getStringToReferenceTypeConverter());
    }

	public void afterPropertiesSet() {
        super.afterPropertiesSet();
        installLabelConverters(getObject());
    }
}
